//router.js
//router.js
import {createRouter,createWebHistory} from "vue-router";


const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import('../views/Home.vue')
    },
    {
        path: '/Login',
        name: 'Login',
        component: () => import('../views/Login.vue'),
        children:[
            { path: '', component: () => import('../components/Login/LoginPanel.vue') },
            { path: 'Register', component: () => import('../components/Login/RegisterPanel.vue') },
        ]
    },
    {
        path: '/MainMap',
        name: 'MainMap',
        component: () => import('../views/MainMap.vue')
    },
    {
        path: '/Personal',
        name: 'Personal',
        component: () => import('../views/Personal.vue'),
        children:[
            { path: '', component: () => import('../components/Personal/personMessage.vue') },
            { path: 'personPermission', component: () => import('../components/Personal/personPermission.vue') },
            { path: 'personFiles', component: () => import('../components/Personal/personFiles.vue') },
            { path: 'personProjects', component: () => import('../components/Personal/personProjects.vue') },
        ]
    },
    {
        path: '/Project',
        name: 'Project',
        component: () => import('../views/Project.vue'),
        children:[
            { path:'', component: () => import('../components/Project/ProjectMessage.vue') },
            { path:'projectFile', component: () => import('../components/Project/ProjectFile.vue') },
            { path:'layersManage', component: () => import('../components/Project/ProjectLayers.vue') },
            { path:'mapDesign', component: () => import('../components/Project/ProjectMap.vue') },
            { path:'preditGM', component: () => import('../components/Project/ProjectGM.vue') },
            { path:'preditMarkov', component: () => import('../components/Project/ProjectMarkov.vue') },
        ]
    }
];





const router = createRouter({
  history: createWebHistory(),
  routes: routes
});
export default router;